#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int num = 0;
    int n = 1;
    scanf("%d", &num);
    while (num > 0)
    {
        int a = num % 10;
        num = num / 10;
        n *= a;
    }
    printf("%d\n", n);
    return 0;
}